package com.pwt.repository;

import com.pwt.repository.base.BaseRepository;
import com.pwt.entity.PRUEFER;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * PRUEFER Repository层
 *
 * @author auto generated
 * @date 2021-09-28 15:15:37
 */
public interface PRUEFERRepository extends BaseRepository<PRUEFER, Integer> {

    @Query(nativeQuery = true, value = "select distinct p.* from MASCHINE m left join ZU_MA_MAK zma on zma.MAKEY = m.MAMASCHINE left join MASCHINKAT mk on mk.MAKNR = zma.MAKNR left join PRUEFER p on p.PRNAME = mk.MAKBEZ where m.MAMASCHINE in ?1")
    List<PRUEFER> findByMachineId(List<Integer> machines);
}
